﻿using Newtonsoft.Json;
using System;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 授权登录响应
    /// </summary>
    [Serializable]
    public class WechatAuthLoginResponse
    {
        /// <summary>
        /// 会话密钥
        /// </summary>
        [JsonProperty("session_key"), JsonPropertyName("session_key")]
        public string SessionKey { get; set; }

        /// <summary>
        /// 用户在开放平台的唯一标识符，若当前小程序已绑定到微信开放平台帐号下会返回，
        /// </summary>
        [JsonProperty("unionid"), JsonPropertyName("unionid")]
        public string UnionId { get; set; }

        /// <summary>
        /// 用户唯一标识
        /// </summary>
        [JsonProperty("openid"), JsonPropertyName("openid")]
        public string OpenId { get; set; }

        /// <summary>
        /// 错误码
        /// </summary>
        [JsonProperty("errcode"), JsonPropertyName("openid")]
        public int ErrCode { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonProperty("errmsg"), JsonPropertyName("errmsg")]
        public string ErrMsg { get; set; }
    }
}